// 
//public class AltMath {
//	public static int mod(int number, int modulus)
//	{
//		int result=0;
//		
//		if (number>=0)
//		{
//			result = number%modulus;
//		}
//		else
//		{
//			result = number%modulus+modulus;
//		}
//		
//		return result;
//	}
//	
//	public static int[] incArray(int[] array) {
//		int[] temp = array;
//		array = new int[array.length+1];
//		System.arraycopy(temp, 0, array, 0, temp.length);
//		return array;
//	}
//	
//	public static Object[] incArray(Object[] array) {
//		Object[] temp = array;
//		array = new Object[array.length+1];
//		System.arraycopy(temp, 0, array, 0, temp.length);
//		return array;
//	}
//	
//	public static long[] incArray(long[] array) {
//		long[] temp = array;
//		array = new long[array.length+1];
//		System.arraycopy(temp, 0, array, 0, temp.length);
//		return array;
//	}
//	
//	public static int[][] incMatrix(int[][] matrix) {
//		int[][] tempMatrix = matrix;
//		matrix = new int[matrix.length+1][];
//		for (int i=0;i<(matrix.length-1);i++) {
//			matrix[i]=tempMatrix[i];
//		}
//		return matrix;
//	}
//}



public class AltMath {
	public static int mod(int number, int modulus)
	{
		int result=0;
		
		if (number>=0)
		{
			result = number%modulus;
		}
		else
		{
			result = number%modulus+modulus;
		}
		
		return result;
	}
	
	public static int[] flip(int a,int b) {
		int[] array={b,a};
		return array;
	}
	
	public static int[] incArray(int[] array) {
		int[] temp = array;
		array = new int[array.length+1];
		System.arraycopy(temp, 0, array, 0, temp.length);
		return array;
	}
	
	public static button[] incArray(button[] array) {
		button[] temp = array;
		array = new button[array.length+1];
		System.arraycopy(temp, 0, array, 0, temp.length);
		return array;
	}
	
	public static graph[] incArray(graph[] array) {
		graph[] temp = array;
		array = new graph[array.length+1];
		System.arraycopy(temp, 0, array, 0, temp.length);
		return array;
	}
	
	public static radial[] incArray(radial[] array) {
		radial[] temp = array;
		array = new radial[array.length+1];
		System.arraycopy(temp, 0, array, 0, temp.length);
		return array;
	}
	
	public static Object[] incArray(Object[] array) {
		Object[] temp = array;
		array = new Object[array.length+1];
		System.arraycopy(temp, 0, array, 0, temp.length);
		return array;
	}
	
	public static long[] incArray(long[] array) {
		long[] temp = array;
		array = new long[array.length+1];
		System.arraycopy(temp, 0, array, 0, temp.length);
		return array;
	}
	
	public static int[][] incMatrix(int[][] matrix) {
		int[][] tempMatrix = matrix;
		matrix = new int[matrix.length+1][];
		for (int i=0;i<(matrix.length-1);i++) {
			matrix[i]=tempMatrix[i];
		}
		matrix[matrix.length-1] = new int[0];
		return matrix;
	}
}
